import 'package:easy_refresh/easy_refresh.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_heating/mode/list_pagination_model.dart';
import 'package:flutter_smart_heating/ui/ui.dart';

class SearchState {
  UiSearchBarController searchBarController = UiSearchBarController();
  late TabController tabController;
  ListPaginationModel pagination = ListPaginationModel();
  EasyRefreshController refreshController = EasyRefreshController(
    controlFinishLoad: true,
    controlFinishRefresh: true,
  );
  bool loading = false;
  String keyword = '';
  int currentIndex = 0;
  List<dynamic> category = [
    {
      "name": "综合",
      "type": "all",
      "list": [],
    },
    {
      "name": "热企",
      "type": "basic_company",
      "list": [],
    },
    {
      "name": "热站",
      "type": "basic_station",
      "list": [],
    },
    {
      "name": "资讯",
      "type": "plugin_article",
      "list": [],
    },
  ];

  Map<String, dynamic> get result {
    return category[currentIndex];
  }
}
